<div class="main-container">
  <div class="row">
    <div fGrid="6" class="free-demo-board">
      <p>
        {{'DEMO.CONTEXTMENU.DESCRIPTION' | translate}}
      </p>
      <hr>
      <h3 class="free-head-title">{{'API-OPTION' | translate}}<span class="symbol component"></span></h3>
      <div class="free-demo-row">
        <h3 class="free-title">free-contextmenu</h3>
        <p>{{'COMPONENT.CONTEXTMENU' | translate}}</p>
        <free-table>
          <free-table-header>
            <free-table-row>
              <free-table-head><ng-template>{{'PROPERTY' | translate}}</ng-template></free-table-head>
              <free-table-head><ng-template>{{'TYPE' | translate}}</ng-template></free-table-head>
              <free-table-head><ng-template>{{'DESCRIPTION' | translate}}</ng-template></free-table-head>
            </free-table-row>
          </free-table-header>

          <free-table-body>
            <free-table-row>
              <free-table-cell>target</free-table-cell>
              <free-table-cell>
                <ng-template><code>String</code></ng-template>
              </free-table-cell>
              <free-table-cell>
                <ng-template>{{'DEMO.CONTEXTMENU.OPTION.0' | translate}}</ng-template>
              </free-table-cell>
            </free-table-row>
            <free-table-row>
              <free-table-cell>menu</free-table-cell>
              <free-table-cell>
                <ng-template><code>Array</code></ng-template>
              </free-table-cell>
              <free-table-cell>
                <ng-template>{{'DEMO.CONTEXTMENU.OPTION.1' | translate}}</ng-template>
              </free-table-cell>
            </free-table-row>
            <free-table-row>
              <free-table-cell>global</free-table-cell>
              <free-table-cell>
                <ng-template><code>Boolean</code></ng-template>
              </free-table-cell>
              <free-table-cell>
                <ng-template>{{'DEMO.CONTEXTMENU.OPTION.2' | translate}}</ng-template>
              </free-table-cell>
            </free-table-row>
            <free-table-row>
              <free-table-cell>back</free-table-cell>
              <free-table-cell>
                <ng-template><code>Boolean</code></ng-template>
              </free-table-cell>
              <free-table-cell>
                <ng-template>{{'DEMO.CONTEXTMENU.OPTION.3' | translate}}</ng-template>
              </free-table-cell>
            </free-table-row>
          </free-table-body>
        </free-table>
      </div>
    </div>

    <div fGrid="6" class="free-demo-board">
      <div class="free-card-board">
        <h3 class="free-toolbar">Import</h3>
        <free-tab-group direction="right" theme="line">
          <free-tab header="CODE">
            <free-code lang="typescript">
              import &#123;ContextmenuModule&#125; from 'freeng/freeng';
            </free-code>
          </free-tab>
        </free-tab-group>
      </div>

      <div class="free-card-board">
        <h3 class="free-toolbar">Default</h3>
        <free-tab-group direction="right" theme="line">
          <free-tab header="PREVIEW">
            <button fButton #cm>{{'COMPONENT.CONTEXTMENU' | translate}}</button>
          </free-tab>
          <free-tab header="CODE">
            <free-code lang="html">
              &lt;free-contextmenu [target]="cm" [menu]="menu"&gt;&lt;/free-contextmenu&gt;
            </free-code>
            <h4>Javascript</h4>
            <free-code lang="javascript">
              this.menu = [
                &#123;label: 'Child', icon: 'user', item: [&#123;label: 'Child'&#125;]&#125;,
                &#123;separator: true&#125;,
                &#123;label: 'Child', icon: 'user', disabled: true&#125;,
                &#123;label: 'Child', icon: 'user', item: [&#123;label: 'Child'&#125;]&#125;
              ];
            </free-code>
          </free-tab>
        </free-tab-group>
      </div>
    </div>

  </div>
  <blockquote>FreeNG - {{'MOTTO' | translate}}</blockquote>
</div>

<free-contextmenu [target]="cm" [menu]="menu"></free-contextmenu>

<free-contextmenu [global]="true" [menu]="globalMenu"></free-contextmenu>
